package com.sqx.modules.packageTime.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.packageTime.entity.PackageTime;
import com.sqx.modules.packageTime.service.PackageTimeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 包时价格-用户端
 * @author wuChang
 * @since 2024-05-07
 */
@RestController
@Api(value = "包时价格-用户端", tags = {"包时价格-用户端"})
@RequestMapping("/app/packageTime/")
public class AppPackageTimeController {
    @Autowired
    private PackageTimeService packageTimeService;


    /**
     * 获取包时价格列表
     * @param packageTime 包时价格
     */
    @ApiOperation("获取包时价格列表")
    @GetMapping(value = "getPackageTimeList")
    public Result getPackageTimeList(Integer page, Integer limit, PackageTime packageTime) {
        packageTime.setIsEnable(1);
        return Result.success().put("data", packageTimeService.getPackageTimeList(page, limit, packageTime));
    }


}